/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.PA165.musiclibraryapi.services;

import cz.muni.fi.PA165.musiclibraryapi.dto.AlbumDTOInterface;
import java.util.List;

/**
 * This service allows to manipulate with albums on service layer.
 *
 * @author Dominik
 */
public interface AlbumService {
    
    /**
     * Stores new album into database. Id for the new album is automatically
     * generated and stored into id attribute.
     * 
     * @param album album to be created.
     * @throws DataAccessException something goes wrong.
     */         
    public void createAlbum(AlbumDTOInterface album);
     
    /**
     * Returns album with given id.
     * 
     * @param id primary key of requested album.
     * @return album with given id or null if album does not exist.
     * @throws DataAccessException something goes wrong.
     */    
    public AlbumDTOInterface getAlbum(Long id);

    /**
     * Returns list of all albums in the database.
     * 
     * @return list of all albums in database.
     * @throws DataAccessException something goes wrong.
     */
    public List<AlbumDTOInterface> getAllAlbums();
     
    /**
     * Updates album in database.
     * 
     * @param album updated album to be stored into database.
     * @throws DataAccessException something goes wrong.
     */   
    public void updateAlbum(AlbumDTOInterface album);
     
    /**
     * Deletes album from database. 
     * 
     * @param album album to be deleted from db.
     * @throws DataAccessException something goes wrong.
     */   
    public void deleteAlbum(AlbumDTOInterface album);
    
    
}
